<?php
  require_once("../includes.php");
  $membership = New Membership();
  $membership->confirm_admin();

  $dag  = $_POST['dag'];
  $tijd = $_POST['tijd'];

  $users = User::get_all();
  $weken = Les::lesweken($dag, $tijd);

  include('../header.php');
?>

<div id='agenda'>
<div class="block">
  <h2 class="red">Lesgroep Aanpassen</h2>
  <div id="info">
    <?php echo Website::create_link("admin/","Administratie", "right"); ?>
    
    <form action="action.php" method="post">
      <h3>Geselecteerde dag en tijd:</h3>

      <?php 
        echo Website::selection("Dag van de week", "dag", Agenda::days(), $dag);
        echo Website::selection("Tijd", "tijd", Agenda::time_table(), $tijd);

        echo User::selection_all('Selecteer Iemand', 'person');
      ?>
 
      <div id='from_to'>
      <?php 
        echo Website::selection("Vanaf week", "from", $weken);
        echo Website::selection("T/m", "to", $weken, '', " class='short'");
      ?>
      </div>

      <input type='hidden' name='action' value='add'>
      <input type='submit' id='submitButton' value='Toevoegen'>
    </form>
  </div>
</div>
</div>
<?php include('../footer.php'); ?>